package com.practice.spring.cloud.dubbo.client.sample.controller;

import com.practice.spring.cloud.dubbo.sample.api.service.EchoService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yangdejun
 * @date 2020/12/08
 **/
@RestController
public class EchoController {

    @DubboReference
    private EchoService echoService;

    @GetMapping(value = "/echo")
    public String echo(String message) {
        return echoService.echo(message);
    }
}
